package com.java.servlet;

import java.io.IOException;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.java.util.LoginUtil;

public class LoginServlet extends HttpServlet{
	
	public void doPost(HttpServletRequest request, HttpServletResponse response){
		LoginUtil loginutil = new LoginUtil();
		try {
			loginutil.login(request, response);
		} catch (Exception e) {
			e.printStackTrace();
		}
		
		RequestDispatcher rd;
		
		rd = getServletContext().getRequestDispatcher("/decorators/layout.jsp");
		
		try {
			rd.forward(request, response);
		} catch (ServletException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		} finally {

		}
	}
	
}
